<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-on的参数问题</title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>
<body>
    <div id="app">
        <button @click="btn1Click(123)">按钮1</button>
        <button @click="btn1Click">按钮1</button>
        <button @click="btn2Click">按钮2</button>
        <!-- 在调用方式，如何手动获取到浏览器参数的event对象： $event -->
        <button @click="btn3Click(123, $event)">按钮3</button>
        <button @click="btn4Click">按钮4</button>
    </div>
    <script>
        const app = new Vue({
            el: "#app",
            data: {
                message: "你好啊！"
            },
            methods: {
                btn1Click(abc) {
                    console.log( abc, 'btn1Click')
                },
                btn2Click(abc) {
                    console.log("btn2Click")
                },
                btn3Click(abc, event) {
                   console.log('哈哈哈哈', abc, event)

                },
                btn4Click() {

                }
            }
        })
    </script>
</body>
</html>